<template>
  <div class="goods">
    <search-page :searchFormConfig="searchFormConfig" />

    <page-content :pageContentConfig="pageTableConfig" pageName="goods">
      <template #status="scope">
        <el-button size="small" :type="scope.row.status ? 'success' : 'danger'">
          {{ scope.row.status ? '正常' : '停止' }}
        </el-button>
      </template>
      <template #image="scope">
        <el-image
          style="width: 60px; height: 60px"
          :src="scope.row.imgUrl"
          :preview-src-list="[scope.row.imgUrl]"
          :preview-teleported="true"
        >
        </el-image>
      </template>
    </page-content>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

import { searchFormConfig } from './config/search.config'
import { pageTableConfig } from './config/pageContent.config'

export default defineComponent({
  name: 'goods',
  setup() {
    return {
      searchFormConfig,
      pageTableConfig
    }
  }
})
</script>

<style scoped></style>
